package Traffic;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Matthew
 */
public class Vehicle
{
    //The vehicle's position and size
    public PositionArea position;
    //The vehicle's direction
    public Direction primaryDirection;
    //The vehicle's secondary direction
    public Direction secondaryDirection;
    //The duration the secondary direction takes effect
    public int secondaryDuration;
    //Cycles to be immobile (for breaking down)
    public int breakdownDur;
    //The vehicles speed
    public int speed;
    //If the vehicle wants to turn and in which direction
    public VehicleTurn turning;
    //The number of moves the vehicle needs to move before it can turn after it has entered the intersection
    public int movesUntilTurn;

    //Constructor: Initialises a new vehicle
    Vehicle(PositionArea p, Direction d, int vehSpeed, VehicleTurn turn)
    {
        position = p;
        primaryDirection = d;
        breakdownDur = 0;
        secondaryDirection = Direction.UNDEFINED;
        secondaryDuration = 0;
        breakdownDur = 0;
        speed = vehSpeed;
        turning = turn;
        movesUntilTurn = -1;
    }

}

